home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / installer / Install-DICE < prev    next >
Encoding:
Text File  |  1994-08-18  |  29.5 KB  |  1,041 lines

  1. ;
  2. ; Script to install DICE.
  3. ;
  4. ; $Id: Install-DICE,v 30.0 1994/06/10 17:55:02 dice Exp $
  5. ;
  6. ;    Todo:
  7. ;        For non-installed options, leave a README describing
  8. ;        what they've missed and where to find it.
  9. ;
  10. ;        Put source control documentation into source control group
  11. ;        (the documentation is large, and irrelevant if source
  12. ;         control is not in use).
  13. ;    Bugs:
  14. ;        Installs all docs if you ask for any of the docs.
  15. ;
  16.  
  17. (set Dice_Version "V3.0")
  18.  
  19. ; Set state variables
  20. ;
  21. (set dice_dest (getassign "DCC" "a"))
  22. (set sb_full            0)
  23. (set sb_selective       1)
  24. (set sb_indexupdate     2)
  25.  
  26. (delopts "force")               ;Unprotect destination files automatically
  27. (user 2)                        ;Ask them all the questions.  Sorry.
  28.  
  29. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  30. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  31. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  32. ; Dice Version Number used in the naming convention of the distribution
  33. ; diskettes. ie. Disk1_DiceVersion,  Disk2_DiceVersion etc.
  34. ;
  35.  
  36. ; Set up logical disk Disks
  37. ;
  38. (set Disk1: (cat "Disk1_" Dice_Version ":"))
  39. (set Disk1  (cat "Disk1_" Dice_Version))
  40. (set Disk2: (cat "Disk2_" Dice_Version ":"))
  41. (set Disk2  (cat "Disk2_" Dice_Version))
  42. (set Disk3: (cat "Disk3_" Dice_Version ":"))
  43. (set Disk3  (cat "Disk3_" Dice_Version))
  44. (set Disk4: (cat "Disk4_" Dice_Version ":"))
  45. (set Disk4  (cat "Disk4_" Dice_Version))
  46. (set Disk5: (cat "Disk5_" Dice_Version ":"))
  47. (set Disk5  (cat "Disk5_" Dice_Version))
  48.  
  49.  
  50. ; Set up a error cleanup routine
  51. ;
  52. (onerror)
  53. (complete 0)
  54.  
  55.  
  56. ;=============================================================================
  57. ;=============================================================================
  58. ;=============================================================================
  59. (procedure dicehelp
  60. ;
  61. ;    Build index for online help system (s:DICEHelp.index)
  62. ;
  63. ;    Note: If DiceHelp is already running, the new index file won't
  64. ;    be automatically noticed.  You must break the old DiceHelp.
  65. ;
  66. (complete 85)
  67.  
  68. (if (askbool
  69.     (prompt "Install is about to build an index file "
  70.         "for use by the DICEHelp help system.\n\n"
  71.         "If you have a copy of the the Amiga \"AutoDoc\", "
  72.         "files, please push YES then select the location.")
  73.      (help  "The \"AutoDoc\" files document every function "
  74.         "built into the Amiga Operating System.\n\n"
  75.         "See the DICE manual for information on ordering "
  76.         "a copy of the \"AutoDocs\" direct from Commodore.\n\n"
  77.         "The index file will be named s:DiceHelp.index")
  78.      (default 0)
  79.     )
  80.     (set adoc_source
  81.     (askdir
  82.         (prompt "Please select the directory containing your copy of "
  83.             "the Commodore \"AutoDoc\" files.")
  84.         (help   "See the DICE manual for information on ordering "
  85.             "a copy of the \"AutoDocs\" direct from Commodore.\n")
  86.         (default "work:doc")
  87.     )
  88.     )
  89. )
  90. (complete 90)
  91.  
  92.  
  93. (delete "s:DiceHelp.index")
  94. (working "Building index file : Online Documentation")
  95. (if adoc_source
  96.     (set adoc_source ("\"%s\""  (tackon adoc_source "#?.doc")))
  97. )
  98. (run
  99.     (cat  (tackon dice_dest "bin/Makeindex")
  100.       " >con:0/0/640/63/DiceHelp_Index_Builder/INACTIVE "
  101.       "s:DiceHelp.index " (tackon dice_dest "doc/#?.doc ") adoc_source
  102.     )
  103. )
  104. (complete 95)
  105.  
  106.  
  107. (working "Building index file : Includes & Structures")
  108. ;
  109. ;    Choose the latest installed version of the includes.
  110. ;
  111. (if (exists (tackon dice_dest "include/amiga13"))
  112.     (set idoc_source (tackon dice_dest "include/amiga13/#?/#?.h"))
  113. )
  114. (if (exists (tackon dice_dest "include/amiga20"))
  115.     (set idoc_source (tackon dice_dest "include/amiga20/#?/#?.h"))
  116. )
  117. (if (exists (tackon dice_dest "include/amiga30"))
  118.     (set idoc_source (tackon dice_dest "include/amiga30/#?/#?.h"))
  119. )
  120. (run
  121.     (cat  (tackon dice_dest "bin/Makeindex")
  122.       " >con:0/0/640/79/DiceHelp_Index_Builder/INACTIVE "
  123.       "s:DiceHelp.index "
  124.       (tackon dice_dest "include/#?.h ")
  125.       (tackon dice_dest "include/#?/#?.h ")
  126.       idoc_source
  127.     )
  128. )
  129.  
  130. )    ;End procedure dicehelp
  131. ;=============================================================================
  132. ;=============================================================================
  133. ;=============================================================================
  134.  
  135. ;***********************************************************************
  136. ;
  137. ; Now get the basic answers to questions about the whole process
  138. ; We do this now to avoid having to ask them between disks.
  139. ;
  140. ;***********************************************************************
  141.  
  142. (set is_update 0)
  143. (if (dice_dest)
  144.     (set is_update 1)           ;Old DCC: found
  145. )
  146.  
  147. (set inst_level
  148.    (askchoice
  149.       (prompt "What type of install would you like?")
  150.       (help "For a complete installation, DICE should not currently be "
  151.         "installed on your system.  Delete or rename the directory, "
  152.         "and remove the assigns from the "s:user-startup" file.\n"
  153.         "You may add modules to an existing installation at any time.\n"
  154.         "If documentation files change, you will need to refresh the "
  155.         "index file used by the online help system."
  156.       )
  157.       (choices  "Complete installation"
  158.         "Add modules to existing installation"
  159.         "Refresh DICEHelp index file")
  160.       (default is_update)
  161.    )
  162. )
  163.  
  164.  
  165. ;***********************************************************************
  166. ; Determine if this is really an update or a new install.
  167. ;***********************************************************************
  168.  
  169. (if (= inst_level sb_indexupdate)
  170.     (
  171.     (dicehelp)
  172.     (exit)
  173.     )
  174. )
  175.  
  176. (if (= inst_level sb_full)
  177.     (if dice_dest
  178.        (if (askbool
  179.            (prompt "There appears to be a current copy of DICE in "
  180.          "the drawer named \"" dice_dest "\""".\n\n"
  181.          "Please rename or remove this copy before installing. "
  182.          "You may also need to delete the DCC: assign from your "
  183.          "\"s:user-startup\" file and reboot."
  184.            )
  185.            (help
  186.          "The installer has determined that you may already have a "
  187.          "copy of DICE installed on your system.  Delete the \"DCC:\" "
  188.          "assign with \"assign DCC: remove\" to fool the installer."
  189.            )
  190.            (choices "Exit" "Continue Anyway")
  191.        )
  192.        (exit)
  193.        )
  194.     )
  195. )
  196.  
  197. ;    If there is not already a destination, ask for one.
  198. ;
  199. ;
  200. (if dice_dest
  201.    (debug "Already have a dice destination")
  202.    (
  203.    (set dice_dest
  204.       (tackon
  205.      (askdir
  206.         (prompt "Please select a location for DICE.  A subdirectory named "
  207.         "\"Dice\" will be created.")
  208.         (help @askdir-help)
  209.         (default @default-dest)
  210.      )
  211.      "Dice"
  212.       )
  213.    )
  214.    (set is_update 0)
  215.    )
  216. )
  217. (debug "DICE Location=" dice_dest "Type=" inst_level)
  218.  
  219. ;***********************************************************************
  220. ; Find out which OS is running 1.3, 2.x, 3.x
  221. ;***********************************************************************
  222. (set vernum (getversion))
  223. (set ver (/ vernum 65536))
  224. ;(set rev (- vernum (* ver 65536)))
  225.  
  226. ((set running_os "1.3")(set default_os 1))      ; Bit 0
  227. (if (>= ver 37)
  228.     ((set running_os "2.0")(set default_os 2))  ; Bit 1
  229. )
  230. (if (>= ver 39)
  231.     ((set running_os "3.0")(set default_os 4))  ; Bit 2
  232. )
  233.  
  234. (if (= inst_level sb_selective)
  235.     (set default_os 0)
  236. )
  237.  
  238. (set targ_os
  239.    (askoptions
  240.       (prompt "Installer has determined you are currently running "
  241.           "Amiga OS version " running_os ". What version of "
  242.           "include files and link libraries do you want installed?\n\n"
  243.           "Note: If you are not sure, just click proceed.")
  244.  
  245.       (help @askchoice-help)
  246.       (choices "1.3 Includes and Libraries"
  247.            "2.0 Includes and Libraries"
  248.            "3.0 Includes and Libraries")
  249.       (default default_os)
  250.    )
  251. )
  252.  
  253. (debug "OS" targ_os "Editor" editor "Running OS" running_os)
  254.  
  255. ;***********************************************************************
  256. ; Ask the users what to install.
  257. ;***********************************************************************
  258. (if (= inst_level sb_selective)
  259.     (set inst_groups  0)
  260.     (set inst_groups 63)
  261. )
  262. (set ib_basic    0)
  263. (set ib_extended 1)
  264. (set ib_debugger 2)
  265. (set ib_docs     3)
  266. (set ib_rcs      4)
  267. (set ib_mmutool  5)
  268. (set ib_esource  6)
  269. (set ib_romstuff 7)
  270.  
  271. (set inst_groups
  272.    (askoptions
  273.       (prompt "Which DICE features do you wish to install?")
  274.       (help  "If you have limimted hard disk space, you may wish "
  275.          "to trim away certain features."
  276.          )
  277.       (choices  "Basic DICE Compiler              290K"
  278.         "Extended Tools                   350K"
  279.         "Debugger                         180K"
  280.         "Online Documentation             488K"
  281.         "Resource Control System (RCS)    465K"
  282.         "Advanced Developer Tools         441K"
  283.         "Example Source Code        629K-1309K"
  284.         "ROM Development Support           50K")
  285.       (default inst_groups)
  286.    )
  287. )
  288.  
  289.  
  290. ;***********************************************************************
  291. ; Determine which examples should be installed only if source code
  292. ; examples option was selected.
  293. ;
  294. ; NOTE: There were too many options for Installer to handle.  So
  295. ; I broke the source into three groups.  You could add finer selection
  296. ; to each group, especially the Example group.    There should be a
  297. ; separate selection for the "amiga" portions of the library source;
  298. ; the startups, c.a, x.a, etc.
  299. ;
  300. ;***********************************************************************
  301. (if (= inst_level sb_selective)
  302.     (set examp_groups  0)
  303.     (set examp_groups  3)
  304. )
  305. (set eb_examples  0)
  306. (set eb_library   1)
  307.  
  308. (if (in inst_groups ib_esource)
  309.    (
  310.       (set examp_groups
  311.      (askoptions
  312.         (prompt "Which example groups would you like installed?")
  313.         (help @askoptions-help)
  314.         (choices "Example Source         680K"
  315.              "Library Source         629K"
  316.         )
  317.         (default examp_groups)
  318.      )
  319.       )
  320.    )
  321. )
  322.  
  323. ;***********************************************************************
  324. ; Determine which online documentation should be installed only if
  325. ; online documentation option was selected.
  326. ;***********************************************************************
  327. (if (= inst_level sb_selective)
  328.     (set doc_groups  0)
  329.     (set doc_groups  15)
  330. )
  331. (set db_command  0)
  332. (set db_library  1)
  333. (set db_quickref 2)
  334. (set db_debugger 3)
  335.  
  336. (if (in inst_groups ib_docs)
  337.    (
  338.       (set doc_groups
  339.      (askoptions
  340.         (prompt "What online documentation would you like installed?")
  341.         (help @askoptions-help)
  342.         (choices "DICE Commands            175K"
  343.              "DICE Library Functions   270K"
  344.              "Amiga Quick Reference      8K"
  345.              "Debugger                  35K")
  346.         (default doc_groups)
  347.      )
  348.       )
  349.    )
  350. )
  351. (debug "Doc groups " doc_groups)
  352.  
  353. ;
  354. ;    Documentation is found in these files:
  355. ;
  356. ;        dice_libraries.doc    ; All of manual chapter 11 (VSuck'ed)
  357. ;        dice_commands.doc    ; All of manual chapter 07 (VSuck'ed)
  358. ;        dice_extras.doc     ; Extra bits, not found elsewhere
  359. ;        dice_debugger.doc    ; The debugger
  360. ;
  361. ;    These could be split up into categories, given VSuck hints in the
  362. ;    Ventura source.
  363. ;
  364. (if (<> doc_groups 0)
  365.    (
  366.       (set doc_list
  367.      (cat
  368.         (if (in doc_groups db_command  ) "dice_commands.doc ")
  369.         (if (in doc_groups db_library  ) "dice_libraries.doc ")
  370.         (if (in doc_groups db_quickref ) "dice_extras.doc ")
  371.         (if (in doc_groups db_debugger ) "dice_debugger.doc ")
  372.      )
  373.       )
  374.    )
  375. )
  376. (debug "doc_list " doc_list)
  377.  
  378.  
  379. ;***********************************************************************
  380. ; Now determine which library models should be installed.
  381. ; Who said anything was easy.
  382. ;***********************************************************************
  383. (if (= inst_level sb_selective)
  384.     (set lib_default 0)
  385.     (set lib_default 7)
  386. )
  387.  
  388. (set lib_groups
  389.    (askoptions
  390.       (prompt "Which Library Models do you want installed?")
  391.       (help @askoptions-help)
  392.       (choices "Small Data Model"
  393.            "Registerized Parameters"
  394.            "General Profiling"
  395.            "Amiga Library Profiling"
  396.            "Unix Common Model Data"
  397.            "Large Data Model")
  398.       (default lib_default)
  399.    )
  400. )
  401.  
  402. ; Set tgroup for the following table
  403. ;
  404. (set tgroup lib_groups)
  405. (if (in inst_groups ib_romstuff)        (set tgroup (+ tgroup 256)))
  406. (if (in targ_os 0)                      (set tgroup (+ tgroup 64 )))
  407. (if (in targ_os 1)                      (set tgroup (+ tgroup 128)))
  408. (if (in targ_os 2)                      (set tgroup (+ tgroup 512)))
  409. (debug "Library Groups" lib_groups "Tgroup Calculation" tgroup)
  410.  
  411. ;             /---------------------------------   1 - Small Data Model
  412. ;             |     /-----------------------------   2 - Reg Parms
  413. ;             |     |   /-------------------------   4 - General Profiling
  414. ;             |     |   |     /---------------------   8 - Amiga Profiling
  415. ;             |     |   |     |   /-----------------  16 - Umix common
  416. ;             |     |   |     |   |     /-------------  32 - Large Data Model
  417. ;             |     |   |     |   |     |   /---------  64 - 1.3
  418. ;             |     |   |     |   |     |   |     /----- 128 - 2.0
  419. ;             |     |   |     |   |     |   |     |   /- 256 - Rom Library
  420. ;             |     |   |     |   |     |   |     |   |
  421. ;             v     v   v     v   v     v   v     v   v
  422. ;             1     2   4     8: 16    32  64 128:256 512  - 3.0
  423. ;amiga13l.lib     96          :     x   x      :
  424. ;amiga20l.lib    160          :     x     x:
  425. ;amiga13s.lib     65  x          :         x      :
  426. ;amiga20s.lib    129  x          :         x:
  427. ;cs.lib___________1__x____________:_______________:______
  428. ;ms.lib       1  x          :          :
  429. ;roms.lib    257  x          :          :  x
  430. ;ucs.lib     17  x          :  x          :
  431. ;amiga13sp.lib     73  x         x:         x      :
  432. ;amiga20sp.lib__137__x___________x:______________x:______
  433. ;amiga20sr.lib    131  x     x      :         x:
  434. ;csr.lib      3  x     x      :          :
  435. ;msr.lib      3  x     x      :          :
  436. ;romsr.lib    259  x     x      :          :  x
  437. ;ucsr.lib________19__x___x________:__x____________:______
  438. ;amiga20srp.lib 139  x     x     x:         x:
  439. ;csp.lib      5  x         x      :          :
  440. ;msp.lib      5  x         x      :          :
  441. ;csrp.lib      7  x     x   x      :          :
  442. ;msrp.lib_________7__x___x___x____:_______________:______
  443. ;             0     1   2     3   4     5   6     7   8    # bit number
  444.  
  445. ;
  446. ;    The following libraries are shipped uncompressed:
  447. ;c.o             *          :          :
  448. ;c_pi.o          *          :          :
  449. ;c_pr.o          *          :          :
  450. ;x.o             *          :          :
  451. ;autos.lib         *          :          :
  452. ;amiga20s.lib         *          :          :
  453. ;
  454. ;     (if tgroup ("c.o\n" "c_pi.o\n" "c_pr.o\n" "x.o\n" "autos.lib\n"))
  455. ;     (if (= (in tgroup 0 7)     129) "amiga20s.lib\n")
  456. ;
  457. (set LIBLISTDICE
  458.    (cat
  459.       (if tgroup ("DLib/c.o\nDLib/c_pi.o\nDLib/c_pr.o\n"))
  460.       (if tgroup ("DLib/x.o\nDLib/autos.lib\n"))
  461.       (if (= (in tgroup 0)         1) "DLib/cs.lib\nDLib/ms.lib\n")
  462.       (if (= (in tgroup 0 1)       3) "DLib/csr.lib\nDLib/msr.lib\n")
  463.       (if (= (in tgroup 0 2)       5) "DLib/csp.lib\nDLib/msp.lib\n")
  464.       (if (= (in tgroup 0 1 2)     7) "DLib/csrp.lib\nDLib/msrp.lib\n")
  465.  
  466.       (if (= (in tgroup 0 4)      17) "DLib/ucs.lib\n")
  467.       (if (= (in tgroup 0 1 4)    19) "DLib/ucsr.lib\n")
  468.  
  469.       (if (= (in tgroup 0 8)     257) "DLib/roms.lib\n")
  470.       (if (= (in tgroup 0 1 8)   259) "DLib/romsr.lib\n")
  471.  
  472.       (if (= (in tgroup 5)        32) "DLib/cl.lib\nDLib/ml.lib\nDLib/autol.lib\n")
  473.       (if (= (in tgroup 1 5)      34) "DLib/crl.lib\nDLib/mrl.lib\n")
  474.       (if (= (in tgroup 2 5)      36) "DLib/cpl.lib\nDLib/mpl.lib\n")
  475.       (if (= (in tgroup 1 2 5)    38) "DLib/crpl.lib\nDLib/mrpl.lib\n")
  476.  
  477.       (if (= (in tgroup 5 8)     288) "DLib/roml.lib\n")
  478.       (if (= (in tgroup 5 1 8)   290) "DLib/romrl.lib\n")
  479.    )
  480. )
  481. (set LIBLISTAMIGA12
  482.    (cat
  483.       (if (= (in tgroup 5 6)      96) "DLib/amiga13l.lib\n")
  484.       (if (= (in tgroup 0 6)      65) "DLib/amiga13s.lib\n")
  485.       (if (= (in tgroup 0 3 6)    73) "DLib/amiga13sp.lib\n")
  486.  
  487.       (if (= (in tgroup 0)         1) "DLib/amiga20s.lib\n")
  488.       (if (= (in tgroup 0 1 7)   131) "DLib/amiga20sr.lib\n")
  489.       (if (= (in tgroup 0 3 7)   137) "DLib/amiga20sp.lib\n")
  490.       (if (= (in tgroup 0 1 3 7) 139) "DLib/amiga20srp.lib\n")
  491.       (if (= (in tgroup 5 7)     160) "DLib/amiga20l.lib\n")
  492.       (if (= (in tgroup 5 1 7)   162) "DLib/amiga20rl.lib\n")
  493.       (if (= (in tgroup 5 3 7)   168) "DLib/amiga20pl.lib\n")
  494.       (if (= (in tgroup 5 1 3 7) 170) "DLib/amiga20rpl.lib\n")
  495.    )
  496. )
  497. (set LIBLISTAMIGA30
  498.    (cat
  499.       (if (= (in tgroup 0 9)     513) "DLib/amiga30s.lib\n")
  500.       (if (= (in tgroup 0 1 9)   515) "DLib/amiga30sr.lib\n")
  501.       (if (= (in tgroup 0 3 9)   521) "DLib/amiga30sp.lib\n")
  502.       (if (= (in tgroup 0 1 3 9) 523) "DLib/amiga30srp.lib\n")
  503.       (if (= (in tgroup 5 9)     544) "DLib/amiga30l.lib\n")
  504.       (if (= (in tgroup 5 1 9)   546) "DLib/amiga30rl.lib\n")
  505.       (if (= (in tgroup 5 3 9)   552) "DLib/amiga30pl.lib\n")
  506.       (if (= (in tgroup 5 1 3 9) 554) "DLib/amiga30rpl.lib\n")
  507.    )
  508. )
  509. (debug "Library List DICE "   LIBLISTDICE)
  510. (debug "Library List AMIGA12" LIBLISTAMIGA12)
  511. (debug "Library List AMIGA30" LIBLISTAMIGA30)
  512.  
  513. ;***********************************************************************
  514. ; Begin the joys of installation. Setup Dice drawer and icon if not there.
  515. ; At this point we have a valid destination, so we tell installer where
  516. ; the application will end up so the exit page will be correct -- also,
  517. ; the installation log file (if any) will be copied to the destination.
  518. ;***********************************************************************
  519. (set @default-dest dice_dest)
  520.  
  521.     (
  522.     (makedir dice_dest (infos))
  523.     (makedir (tackon dice_dest "Bin"     ) (infos))
  524.     (makedir (tackon dice_dest "Tools"   ) (infos))
  525.     (makedir (tackon dice_dest "Config"  ) (infos))
  526.     (makedir (tackon dice_dest "User"    ) (infos))
  527.     (makedir (tackon dice_dest "Examples") (infos))
  528.     (makedir (tackon dice_dest "dtmp"))
  529.     (makedir (tackon dice_dest "lib"))
  530.     (makedir (tackon dice_dest "doc"))
  531.     (makedir (tackon dice_dest "s"))
  532.     (makedir (tackon dice_dest "Rexx"))
  533.     (makedir (tackon dice_dest "Include"))
  534.     (makedir (tackon dice_dest "Dlib"))
  535.     )
  536.  
  537.  
  538. ;***********************************************************************
  539. ;                   Install Disk 1
  540. ;***********************************************************************
  541. (complete 1)
  542.  
  543. (askdisk
  544.    (prompt "Please insert the disk labeled " Disk1 ".\n"
  545.        "(disk insertion is automatically detected)" )
  546.    (help   "The DICE program and other tools will be copied "
  547.        "from the Disk " Disk1 " into your system.")
  548.    (dest Disk1)
  549. )
  550.  
  551.  
  552. ;Copy lhex to ram: and set variable to point to lhex utility
  553. ;
  554. (run "delete ram:lhex force" (safe))
  555.  
  556. (if (exists (tackon dice_dest "bin/lhex"))
  557.     (
  558.     (debug "dice_destbin/lhex exists")
  559.     (copyfiles
  560.     (source (tackon dice_dest "Bin/"))
  561.     (dest "ram:")
  562.     (choices  "lhex")
  563.     (safe)
  564.     )
  565.     )
  566.     (
  567.     (debug "dice_destbin/lhex not found - copying from source")
  568.     (copyfiles
  569.     (source (cat Disk1: "bin/"))
  570.     (dest "ram:")
  571.     (choices  "lhex")
  572.     (safe)
  573.     )
  574.     )
  575. )
  576. (set lhopt "ram:lhex >CON:0/0/640/40/Unpacker/INACTIVE -faw=%s xv %s")
  577. (set lhext "ram:lhex >CON:0/0/640/40/Unpacker/INACTIVE <ram:lhex.list -faw=%s xv %s")
  578. (complete 3)
  579.  
  580.     (
  581.     (if (in inst_groups ib_basic)
  582.         (
  583.         (copyfiles
  584.             (source Disk1:)
  585.             (dest dice_dest)
  586.             (choices "bin" "config" "rexx" "s" "l" "libs")
  587.             (infos)
  588.         )
  589.         (copyfiles
  590.            (source Disk1:)
  591.            (dest dice_dest)
  592.            (choices "About_Dice" "Known_Buglist" "Release_Notes" "Copyright_Information")
  593.            (infos)
  594.         )
  595.         )
  596.     )
  597.     (complete 5)
  598.  
  599.     (if (in targ_os 0)      ; 1.3 Includes
  600.         (
  601.         (working "Installing Commodore 1.3 Include Files")
  602.         (run (lhopt (tackon dice_dest "Include/") (cat Disk1: "include_13.lha")))
  603.         )
  604.     )
  605.     (complete 7)
  606.  
  607.     (if (in targ_os 1)      ; 2.0 Includes
  608.         (
  609.         (working "Installing Commodore 2.x Include Files")
  610.         (run (lhopt (tackon dice_dest "Include/ ") (cat Disk1: "include_20.lha") ))
  611.         )
  612.     )
  613.     (complete 9)
  614.  
  615.     (if (in inst_groups ib_extended)
  616.         (
  617.         (working "Installing extended tools")
  618.         (run (lhopt (tackon dice_dest "Bin/") (cat Disk1: "extended_tools.lha")))
  619.         )
  620.     )
  621.     (complete 11)
  622.     )
  623.  
  624. ;***********************************************************************
  625. ;                   Install Disk 2
  626. ;***********************************************************************
  627.  
  628.  
  629. (askdisk
  630.    (prompt "Please insert the disk labeled " Disk2 ".\n"
  631.        "(disk insertion is automatically detected)" )
  632.    (help   "Some DICE Libraries, Source code, Documentation and Includes"
  633.        "will be copied from the Disk "  Disk2 " into your system.")
  634.    (dest Disk2)
  635. )
  636.  
  637.     (
  638.     (if targ_os
  639.         (
  640.         (working "Installing Common Include Files")
  641.         (run (lhopt (tackon dice_dest "Include/") (cat Disk2: "include_common.lha")))
  642.         )
  643.     )
  644.     (complete 14)
  645.  
  646.     (if (in targ_os 2)      ; 3.0 Includes
  647.         (
  648.         (working "Installing Commodore 3.x Include Files")
  649.             (run (lhopt (tackon dice_dest "Include/") (cat Disk2: "include_30.lha")))
  650.         )
  651.     )
  652.     (complete 20)
  653.  
  654.     (if LIBLISTDICE
  655.         (
  656.         (working "Installing DICE Link Libraries")
  657.         (textfile
  658.             (dest "ram:lhex.list")
  659.             (append LIBLISTDICE)
  660.             (safe)
  661.         )
  662.         (run
  663.             (lhext (dice_dest) (cat Disk2: "dice_linklibs.lha"))
  664.         )
  665.         (delete "ram:lhex.list" (safe))
  666.         )
  667.     )
  668.     (complete 30)
  669.     )
  670.  
  671.  
  672. ;***********************************************************************
  673. ;                   Install Disk 3
  674. ;***********************************************************************
  675.  
  676.  
  677. (askdisk
  678.    (prompt "Please insert the disk labeled " Disk3 ".\n"
  679.        "(disk insertion is automatically detected)" )
  680.    (help   "The remaining DICE Libraries and Examples will be copied "
  681.        "from the Disk "  Disk3 " into your system.")
  682.    (dest Disk3)
  683. )
  684.  
  685.     (
  686.     (if LIBLISTAMIGA12
  687.         (
  688.         (working "Installing Amiga Link Libraries")
  689.         (textfile
  690.             (dest "ram:lhex.list")
  691.             (append LIBLISTAMIGA12)
  692.             (safe)
  693.         )
  694.         (run
  695.             (lhext (dice_dest) (cat Disk3: "amiga12_linklibs.lha"))
  696.         )
  697.         (delete "ram:lhex.list" (safe))
  698.         )
  699.     )
  700.     (complete 52)
  701.  
  702.     (if (in inst_groups ib_rcs)
  703.         (
  704.         (working "Installing the Resource Control System (RCS)")
  705.         (run (lhopt (tackon dice_dest "Bin/") (cat Disk3: "source_control.lha")))
  706.         )
  707.     )
  708.     (complete 54)
  709.  
  710.     (if (in inst_groups ib_docs)
  711.         (
  712.         (working "Installing online help tools")
  713.         (run (lhopt (dice_dest) (cat Disk3: "online_help2.lha")))
  714.         )
  715.     )
  716.     (complete 57)
  717.  
  718.     (if (in inst_groups ib_romstuff)
  719.         (
  720.         (working "Installing ROM tools")
  721.         (run (lhopt (tackon dice_dest "Bin/") (cat Disk3: "rom_tools.lha")))
  722.         )
  723.     )
  724.     (complete 58)
  725.  
  726.     (if (in examp_groups eb_library)  ; Library source code
  727.         (
  728.         (working "Installing DICE Library Source Code")
  729.         (run (lhopt (dice_dest) (cat Disk3: "library_source.lha")))
  730.         )
  731.     )
  732.  
  733.     (complete 61)
  734.  
  735.     )
  736.  
  737. ;***********************************************************************
  738. ;                   Install Disk 4
  739. ;***********************************************************************
  740.  
  741.  
  742. (askdisk
  743.    (prompt "Please insert the disk labeled " Disk4 ".\n"
  744.        "(disk insertion is automatically detected)" )
  745.    (help   "The remaining Libraries, Binaries and Examples will be copied "
  746.      "from the Disk "  Disk4 " into your system.")
  747.    (dest Disk4)
  748. )
  749.    (
  750.  
  751.     (if LIBLISTAMIGA30
  752.         (
  753.         (working "Installing Amiga 3.0 Link Libraries")
  754.         (textfile
  755.             (dest "ram:lhex.list")
  756.             (append LIBLISTAMIGA30)
  757.             (safe)
  758.         )
  759.         (run
  760.             (lhext (dice_dest) (cat Disk4: "amiga30_linklibs.lha"))
  761.         )
  762.         (delete "ram:lhex.list" (safe))
  763.         )
  764.     )
  765.     (complete 80)
  766.  
  767.     (if (in inst_groups ib_debugger)
  768.         (
  769.         (working "Installing debugger")
  770.         (run (lhopt (dice_dest) (cat Disk4: "debugger.lha")))
  771.         )
  772.     )
  773.     (complete 82)
  774.  
  775.     (if (in inst_groups ib_mmutool)
  776.         (
  777.         (working "Installing Memory Management Unit (MMU) tools")
  778.         (run (lhopt (dice_dest) (cat Disk4: "mmu_tools.lha")))
  779.         )
  780.     )
  781.     (complete 85)
  782.  
  783.     (if (in inst_groups ib_basic)
  784.         (
  785.         (working "Installing Miscellaneous Files")
  786.         (run (lhopt (dice_dest) (cat Disk4: "miscellaneous.lha")))
  787.         (copylib
  788.         (source (tackon dice_dest "libs/dicecache.library"))
  789.         (dest "libs:")
  790.           )
  791.         )
  792.     )
  793.     (complete 38)
  794.  
  795.     (if (in examp_groups eb_examples)
  796.         (
  797.         (working "Installing Example Source Code")
  798.         (run (lhopt (dice_dest) (cat Disk4: "example_source.lha")))
  799.         )
  800.     )
  801.     (complete 92)
  802.    )
  803.  
  804.  
  805.  
  806. ;***********************************************************************
  807. ;                   Install Disk 5
  808. ;***********************************************************************
  809.  
  810. (askdisk
  811.    (prompt "Please insert the disk labeled " Disk5 ".\n"
  812.        "(disk insertion is automatically detected)" )
  813.    (help   "The remaining Docs and Binaries will be copied "
  814.      "from the Disk "  Disk5 " into your system.")
  815.    (dest Disk5)
  816. )
  817.  
  818.     (if (in inst_groups ib_docs)
  819.         (
  820.         (working "Installing online help files")
  821.         (run (lhopt (dice_dest) (cat Disk5: "online_help1.lha")))
  822.         )
  823.     )
  824.     (complete 96)
  825.  
  826.     (if (in inst_groups ib_basic)
  827.         (
  828.         (working "Installing basic tools")
  829.         (run (lhopt (tackon dice_dest "Bin/") (cat Disk5: "basic_tools.lha")))
  830.         )
  831.     )
  832.         (complete 98)
  833.  
  834. ;***********************************************************************
  835. ;        Install EDITOR Stuff
  836. ;***********************************************************************
  837. (set ed_nothing 0)
  838. (set ed_ttx     1)
  839. (set ed_ame     2)
  840. (set ed_dme     3)
  841. (set ed_ced     4)
  842. (set ttx_dest (getassign "TurboText" "a"))
  843. (if (ttx_dest)
  844.     (set ed_default 1)
  845.     (set ed_default 2)
  846. )
  847. (if (= inst_level sb_selective)
  848.     (set ed_default 0)
  849. )
  850.  
  851. (set editor
  852.    (askchoice
  853.       (prompt "Which editor will you usually use with DICE?\n"
  854.           "Scripts will be installed to make this editor work "
  855.           "with the DICE Integrated Development Environment.\n\n"
  856.           "Note: If you are not sure, just click proceed.")
  857.       (help   "The editor you choose is the editor you will be using "
  858.           "to edit C source files, compiling etc. with DICE. "
  859.           "AME, DME come with DICE."
  860.           )
  861.       (choices  "Don't change editor setup"
  862.         "TurboText (not included)"
  863.         "AME - Advanced MicroEmacs (included)"
  864.         "DICE Editor DME (included)"
  865.         "Cygnus ED (not included)"
  866.         )
  867.       (default ed_default)
  868.    )
  869. )
  870.  
  871. (set edhelp (cat "The files \"dcc:config/dcc.config\" and "
  872.          "\"dcc:config/vmake.config\" will be set to use your "
  873.          "chosen editor.\n\n"
  874.          "See your editor manual for details on binding keys to "
  875.          "REXX scripts.")
  876. )
  877.  
  878. ;
  879. ;
  880. ;
  881. (debug "Editor=" editor)
  882.  
  883. (if (= editor ed_ttx)
  884.   (
  885.     (if (askbool
  886.     (prompt "-= TurboText Editor Installation =-\n\n"
  887.         "A menu and several key defintions have been "
  888.         "prepared for use with TurboText. "
  889.         "Please edit the file "
  890.         "\"TurboText:support/ttx_startup.dfn\" now. "
  891.         "You must add the line \"dcc:config/TTX_DICE.dfn\" "
  892.         "at the end, in the LINK section. "
  893.         "Do this now."
  894.     )
  895.     (help edhelp)
  896.     (choices "I'm done" "")
  897.     )
  898.     )
  899.     (run (lhopt (dice_dest) (cat Disk5: "ttx_config.lha")))
  900.   )
  901. )
  902.  
  903.  
  904. (if (= editor ed_ame)
  905.   (
  906.     (if (askbool
  907.     (prompt "-= Advanced MicroEmacs Installation =-\n\n"
  908.         "A menu and several key defintions have been "
  909.         "prepared for use with AME. "
  910.         "File \"s:ame_pro.ame\" will be overwritten if it "
  911.                 "exists and you select OK, otherwise a copy will "
  912.                 "be placed in directory DCC:s for you to view."
  913.     )
  914.     (help edhelp)
  915.     (choices "OK" "Do not overwrite")
  916.     )
  917.         (
  918.            (run (lhopt (dice_dest) (cat Disk5: "ame_config.lha")))
  919.            (copyfiles
  920.           (source (tackon dice_dest "s/"))
  921.               (dest "s:")
  922.               (choices "ame_pro.ame")
  923.            )
  924.         )
  925.         (
  926.            (run (lhopt (dice_dest) (cat Disk5: "ame_config.lha")))
  927.         )
  928.     )
  929.   )
  930. )
  931.  
  932. (if (= editor ed_dme)
  933.   (
  934.     (if (askbool
  935.     (prompt "-= DME Editor Installation =-\n\n"
  936.         "We're sorry, but the editor you have selected "
  937.         "is unavailable or out of service. [TBA]"
  938.     )
  939.     (help edhelp)
  940.     (choices "OK" "")
  941.     )
  942.     )
  943.     (run (lhopt (dice_dest) (cat Disk5: "dme_config.lha")))
  944.   )
  945. )
  946.  
  947. (if (= editor ed_ced)
  948.   (
  949.     (if (askbool
  950.     (prompt "-= CygnusED Editor Installation =-\n\n"
  951.         "Use the \"Special\" menu item, then select "
  952.         "\"DOS/AREXX Interface\".  You can load in the default "
  953.         "arexx bindings from DCC:S/RexxCommands "
  954.     )
  955.     (help edhelp)
  956.     (choices "I'll do it" "")
  957.     )
  958.     )
  959.     (run (lhopt (dice_dest) (cat Disk5: "ced_config.lha")))
  960.   )
  961. )
  962.  
  963.  
  964.    ;***********************************************************************
  965.    ;        Build index file if any online docs were installed.
  966.    ;***********************************************************************
  967. (if (in inst_groups ib_docs)
  968.     (dicehelp)
  969. )
  970.  
  971.    ;***********************************************************************
  972.    ;***********************************************************************
  973.    ;        Final Installation Including modifying s:user-startup
  974.    ;***********************************************************************
  975. (if (in inst_groups ib_basic)
  976. (
  977.  
  978. (complete 99)
  979.  
  980. ;
  981. ; modify S:User-Startup.   REMEMBER TO UPDATE ALL THREE COPIES BELOW!
  982. ;
  983.  
  984. (startup "----DICE C Compiler----"
  985.    (prompt
  986.       "Some instructions need to be added to your \"S:user-startup\" "
  987.       "file.  See help for details.")
  988.    (help "Do this or DICE won't work!!\n"
  989.       "Commands added will be:\n\n"
  990.       "ASSIGN DCC: \"" dice_dest "\"\n"
  991.       "ASSIGN DTMP: \"dcc:dtmp\"\n"
  992.       "ASSIGN DINCLUDE: \"dcc:include\"\n"
  993.       "ASSIGN DLIB: \"dcc:dlib\"\n"
  994.       "PATH ADD \"DCC:Bin\" \"DCC:Tools\"\n"
  995.       "SETENV DCCOPTS \"" "-2.0 -// -f -R"  "\"\n"
  996.    )
  997.    (command
  998.       "ASSIGN DCC: \"" dice_dest "\"\n"
  999.       "ASSIGN DTMP: \"dcc:dtmp\"\n"
  1000.       "ASSIGN DINCLUDE: \"dcc:include\"\n"
  1001.       "ASSIGN DLIB: \"dcc:dlib\"\n"
  1002.       "PATH ADD \"DCC:Bin\" \"DCC:Tools\"\n"
  1003.       "SETENV DCCOPTS \"" "-2.0 -// -f -R"  "\"\n"
  1004.    )
  1005. )
  1006.  
  1007. (makeassign "DCC"      dice_dest)
  1008. (makeassign "DTMP"     "dcc:dtmp")
  1009. (makeassign "DINCLUDE" "dcc:include")
  1010. (makeassign "DLIB"     "dcc:dlib")
  1011. (if (getassign "ENV" "a") (run "Setenv DCCOPTS -2.0 -// -f -R"))
  1012.  
  1013.    ;***********************************************************************
  1014.    ;        End game
  1015.    ;***********************************************************************
  1016. (complete 100)
  1017. (askbool
  1018.    (prompt "All the required Assigns have been set for you to run DICE. "
  1019.        "Your startup script automatically adds DICE to the path. "
  1020.        "Until you reboot, you need to issue the command: PATH ADD DCC:BIN "
  1021.        "in any shell you wish to run DICE from.\n\n"
  1022.        "** IMPORTANT ** Please read the \"Release Notes\" file "
  1023.        "for important information, including how to hook your "
  1024.        "editor into the DICE system."
  1025.    )
  1026.    (help   "You may wish to check the s:User-Startup file to be sure "
  1027.        "everything is in the proper place.")
  1028.    (choices "Thank You" "")
  1029.    (default 0)
  1030. )
  1031.  
  1032. )
  1033. )
  1034.  
  1035. ;Cleanup
  1036. ;
  1037. (delete "ram:lhex" (safe))
  1038. (delete "ram:lhex.list" (safe))
  1039.  
  1040. (exit)
  1041.